package com.gsnd.briuppts.result;

/**
 * 统一并自定义返回状态码，如有需求可以另外增加
 */
public enum ResponseCode {

	SUCCESS(200, "OK"),
	ERROR(500, "系统内部错误，请稍后重试"),
	BASE_ERROR(5001, "基础服务失败！"),
	DATA_VALIDATE_ERROR(1001, "数据校验失败"),
	DATA_EMPTY(1002, "接收的数据为空"),
	USER_NOT_LOGIN(2001, "用户未登录"),
	USER_LOGIN_ERROR(2002, "用户名或密码错误"),
	USER_EXISTED(2003, "用户已存在"),
	USER_NOT_EXISTED(2004, "用户不存在"),
	USER_ACCOUNT_FORBIDDEN(2005, "账号已被禁用"),
	USER_ACCESS_DENY(2006, "无访问权限！"),
	RESOURCE_NOT_FOUND(4004, "访问的资源不存在"),
	DATA_WRONG(5002, "数据错误"),
	DATA_EXISTED(5003, "数据已存在"),
	DATA_NOT_FOUND(5004, "数据不存在"),
	TOKEN_NOT_EXIST(3001,"token不存在"),
	TOKEN_INVALID(3002,"token无效");


	private Integer code;
	private String status;

	private ResponseCode(Integer code, String status) {
		this.code = code;
		this.status = status;
	}

	public Integer getCode() {
		return this.code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
